package com.lt.flashcard.model.entity;

import java.util.Date;

import org.bson.types.ObjectId;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Reference;

/**
 * Store static content such as document...
 * @author ocsen
 *
 */
@Entity("content")
public class Content {

	@Id
	private ObjectId id;
	
	private Date created = new Date();
	
	/**
	 * The author
	 */
	private Long userid;
	
	/**
	 * The status of this content
	 */
	private int status = STATUS_PUBLIC;
	public static final int STATUS_PRIVATE = 0;
	public static final int STATUS_PUBLIC = 1;
	
	private String title = "";
	private String content = "";
	
	@Reference
	private ContentCategory category = null;
	
	private int order = 0;

	public ObjectId getId() {
		return id;
	}

	public void setId(ObjectId id) {
		this.id = id;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public ContentCategory getCategory() {
		return category;
	}

	public void setCategory(ContentCategory category) {
		this.category = category;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
}
